﻿using UnityEngine;
using System.Collections;

public class NetMaskBoxController : MonoBehaviour {

	public GameObject m_kGameObject;
    //public GameObject m_kLoadTint;

	private float m_fWaitTime;
    private float m_fTickTime;
	private const float m_fWaitTimeMax = 15f;
    private const float m_kTintLength = 25.75f;
    private float delayTime = 1;

	// Use this for initialization
	void OnEnable () 
	{
		Init();
	}
    
    // Update is called once per frame
    void Update () 
	{
		MaskUpdate(Time.deltaTime);
	}

	public void Init ()
	{
		m_kGameObject.SetActive(false);
		m_fWaitTime = 0;
        m_fTickTime = 0;
	}

	public void MaskUpdate (float fDelta)
	{
		m_fWaitTime += fDelta;
        m_fTickTime += fDelta;
		if (!m_kGameObject.activeSelf && m_fWaitTime > delayTime)
		{
			m_kGameObject.SetActive(true);
		}
	}
}
